// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
    env: 'new-8gg1cp8uaf9d5ccc'
}) // 使用当前云环境

const db  = cloud.database({
    env: 'new-8gg1cp8uaf9d5ccc'
});

// 云函数入口函数
exports.main = async (event, context) => {
    //删除收藏
    return await db.collection('open-collect').where({
        thisCategory:event.thisCategory,
        thisID: event.thisID,
        openid: event.openid
    }).remove()
}